<template>
	<view class="content">
		<view class="card">
			<view class="flex">
				<view class="" style="width: 40%;">
					<view class="text mar">
						我的碳积分
					</view>
					<view class="price mar">
						{{integral}}
					</view>
				</view>
				<view class="" style="width: 50%;">
					<view class="text">
						可提现金额（元）
					</view>
					<view class="price">
						{{integral / 100}}
					</view>
				</view>
			</view>
			<view class="jifen">
				注：100积分 = 1元，积分只能兑换100的倍数
			</view>
		</view>
		<view class="pay">
			<view class="box1" @click="goPay">
				<img src="@/static/images/paymentCode.png" alt="" srcset="">
				<view class="">
					付款码
				</view>
			</view>
			<view class="box2" @click="goTixian">
				<img src="@/static/images/withdrawal.png" alt="" srcset="">
				<view class="">
					去提现
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '../../utils/request.js'
	export default {
		data() {
			return {
				currentIndex: 0,
				currentPrice: 0,
				integral: '',
				aliName: '',
				wxName: '',
				aliAccountNumber: '',
				wxAccountNumber: ''
			}
		},
		methods: {
			call() {
				uni.showToast({
					title: '当前积分为0,无法提现',
					duration: 2000
				});
			},
			scoreWay(num) {
				console.log(num)
				uni.navigateTo({
					//保留当前页面，跳转到应用内的某个页面
					url: `/pagesA/integral/scoreWay?num=${num}`
				})
			},
			goPay() {
				uni.navigateTo({
					//保留当前页面，跳转到应用内的某个页面
					url: '/pagesA/qr-code/qr-code'
				})
			},
			goTixian() {
				uni.navigateTo({
					//保留当前页面，跳转到应用内的某个页面
					url: '/pagesA/integral/withdrawal'
				})
			}
		},
		onLoad(option) {
			this.integral = option.integral == undefined ? uni.getStorageSync('integral') : option.integral
			console.log(this.integral, 'this.integralthis.integral')
			if (option.Num == undefined) {
				this.currentIndex = 0
			} else {
				this.currentIndex = Number(option.Num)
			}

			this.aliName = option.aliName
			this.aliAccountNumber = option.aliAccountNumber
			this.wxName = option.wxName
			this.wxAccountNumber = option.wxAccountNumber
			console.log(this.wxName, this.wxAccountNumber, option.Num, '1111111111111')


		}
	}
</script>

<style lang="scss">
	.content {
		background-color: #F1F4F9;
		width: 100vw;
		height: 100vh;

		.card {
			background: url('../../static/images/gg.png');
			background-size: 100% 100%;
			padding: 44rpx 44rpx 20rpx 32rpx;

			.flex {
				display: flex;
				justify-content: space-between;
				border-bottom: 1rpx solid white;

				.text {
					font-family: Source Han Sans SC;
					font-weight: 400;
					font-size: 24rpx;
					color: #FFFFFF;
					margin-bottom: 20rpx;
				}

				.mar {
					margin-left: 20rpx;
				}

				.price {
					font-family: Source Han Sans SC;
					font-weight: bold;
					font-size: 56rpx;
					color: #FFFFFF;
					margin-bottom: 20rpx;
				}
			}

			.jifen {
				height: 24rpx;
				font-family: Source Han Sans SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #FFFFFF;
				margin: 20rpx 0;
				line-height: 24rpx;
			}
		}
	}

	.pay {
		display: flex;
		justify-content: space-around;
		align-items: center;
		width: 700rpx;
		height: 150rpx;
		margin: 25rpx;
		border-radius: 30rpx;
		background: white;
		box-shadow: #F1F4F9 0px 0px 10px; //将h-shadow,v-shadow设为0px,实现四周阴影

		.box1 {
			display: flex;
			flex-direction: column;
			align-items: center;

			img {
				width: 50rpx;
				height: 50rpx;
			}
		}

		.box2 {
			display: flex;
			flex-direction: column;
			align-items: center;

			img {
				width: 50rpx;
				height: 50rpx;
			}
		}
	}
</style>